<?php
require("JSON.php");
$l = mysql_connect("localhost","thankwsx","801030");
mysql_select_db("thankwsx",$l);
mysql_query("set names 'utf8'");
$id = $_POST["id"];
if(!isset($id)) $id = 0;
$q = "select * from `0211` where `pid`='".$id."'";
$r = mysql_query($q);
while($rw = mysql_fetch_assoc($r)) {
	$mlist[] = array("id"=>$rw["nid"],"name"=>$rw["name"]);
}
$json = new Services_JSON();
$output = $json->encode($mlist);
echo $output;
mysql_close();
?>